home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000133_icon-group-sender _Mon Dec 8 12:31:57 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.7/8.8.7) with SMTP id MAA08434
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 8 Dec 1997 12:31:54 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA07912; Mon, 8 Dec 1997 12:31:53 -0700
Date: Mon, 8 Dec 1997 08:47:18 -0800
From: kwalker@premenos.com (Ken Walker)
Message-Id: <199712081647.IAA00778@varda.premenos.com>
To: icon-group@baskerville.CS.Arizona.EDU, turk@ionet.net
Subject: Re: Two Problems
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Md5: iaTEb+hvh8uW3dlouCzkXg==
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
> Date: Sat, 06 Dec 1997 20:26:56 -0600
> From: "Dr. Louis A. Turk" <turk@ionet.net>
>
> ... I am having two problems:
>
> 1. "every i := find(word,line) do" will only find the first 5 instances of
> word in line, then it fails. Why is this?
Can you give an example of when it fails? I ran the following program
under version 9.0 of Icon on a Sparc without any problem.
procedure main()
local word, line
write(&version)
line := "one two one three one four one five one six one seven one"
word:= "one"
every i := find(word, line) do
write(i)
end
> 2. How can I set the number of spaces '\t' represents? On my computer it
> represents 8 spaces (if I counted right); I want it to represent 11 spaces
> on anybody's computer.
'\t' is a single character. How it gets displayed depends on the software
you use. Icon has no control over that. If you need a specific number
of spaces, you must use space characters instead of tabs. Take a look
at the detab() function. It lets you specify tab stops then replaces
tab characters in a string with the appropriate number of spaces.
Ken Walker, kwalker@premenos.com
Premenos Coporation, Concord, Ca. 94520